<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            background-color: pink;
            transition: all 0.3s;
        }

    </style>
</head>
<body>
    <div class="box">

    </div>

    <script>
        // window.addEventListener('resize', function(e){
        //     console.log(e);
        // })

        const box = document.querySelector('.box')
        box.addEventListener('resize', function(e){
            console.log(e);
        })
        box.addEventListener('click', function(e) {
            this.style.height = '300px'
        })


    </script>
</body>
</html>